package planeWar.src.com.bjsxt.plane;

import java.awt.*;

public class GameObject {
    Image img;
    double x,y;
    int speed;
    int width,height;

    public GameObject() {
    }

    public GameObject(Image img, double x, double y, int speed, int width, int height) {
        this.img = img;
        this.x = x;
        this.y = y;
        this.speed = speed;
        this.width = width;
        this.height = height;
    }
    public void drawMyself(Graphics g){
        g.drawImage(img,(int)x,(int)y,width,height,null);

    }
    public Rectangle getRec(){
        return new Rectangle((int)x,(int)y,width,height);
    }

}
